package easy;

public class Solution_231 {

    public static boolean isPowerOfTwo(int n) {
        if (n==0) {
            return false;
        }
        for (;n!=0 && n!=1;) {
            if (n%2!=0) {
                return false;
            }
            n /= 2;
        }
        return true;
    }

    public static void main(String[] args) {
        int[] a = {1,2,3,1,2,3};
        System.out.println(isPowerOfTwo(1));
    }
}
